package info.techgeek.labs.clone;

public class ShallowCloneTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Customer cust = new Customer("Cust001", new Order(new Item("Item001")));
		System.out.println("original object :" + cust);
		Customer cloned = (Customer) cust.clone();
		System.out.println("cloned object :" + cloned);
		cloned.getOrder().getItem().setItemName("Item002");
		cloned.setName("Cust002");
		System.out.println("original object :"+ cust.getOrder().getItem().getItemName());
		System.out.println("original object :" + cust.getName());
	}
}
